EDITING SKINS
 
Most of the skinning can be done from the GUI, which is probably the easiest way to modify the skins. However, sometimes it might be useful to do the changes directly in the skin files. The skin files weren't originally meant to be edited by hand, so some of the entries might be a bit unintuitive.

The items (numbers) in an image can be placed either horizontally or vertically. The correct placement is determined from the dimensions of the image (i.e. whichever is bigger: height or width). The images must be cropped so that they don't hold any extra space and their width (or height) must be divisional with the number of items in the image. The current version of Rainlendar supports BMP, JPG and PNG files. Them PNGs can include alpha mask.

The name of the skin file can be anything that ends with ".ini". The skins must be placed in a separate subfolders, which will give the name to the skin. The same folder can also contain several skin ini-files.

New in 0.21: The skin format has changed slightly. It is now possible to put the different parts to separate sections. The benefit from this is that you can define the drawing order by placing the sections before each other. The sections are drawn the order they are defined (except that background is drawn always first). Note that dynamic items (Time and Button) are always drawn on top of the static items (i.e. normal calendar graphics). The Image-sections can be drawn in any place.

The sections are: [Background], [Days], [Today], [Weekdays], [Month], [Year], [Event], [WeekNumbers], [Tooltip], [Todo], [MessageBox] and [EventList]. If you use these do not add the [Rainlendar]-section or the skin is read as old format.

Important! If you create a skin that uses the new format you should inform the users that it requires Rainlendar 0.21 or newer. The new skins behave quite badly in 0.20 and older versions.

BackgroundBitmapName
The filename of the background picture to use behind the calendar. You can also select if you want the image to be tiled or stretched if it's too small for the calendar window. It's also possible to grab the desktop behind the calendar and use it as background.

BackgroundMode
0 = Tile background to fill the whole window
1 = Transparent background
2 = Stretch background to fill the whole window
3 = Solid color background

BackgroundBevel
0 = No not draw bevel around solid color background
1 = Draw bevel around solid color background

BackgroundSolidColor
Color of the solid background defined as BGR hex-value (e.g. BackgroundSolidColor=888888)

ToolTipFont
The font to be used with the tooltips. Check below for more info about the fonts.

ToolTipFontColor
Color of the tooltip font defined as BGR hex-value (e.g. ToolTipFontColor=000000)

ToolTipBGColor
Color of the tooltip background defined as BGR hex-value (e.g. ToolTipBGColor=FFFFFF)

DaysEnable
0 = Do not show days in calendar
1 = Show days in calendar

DaysX
X-position of the days

DaysY
Y-position of the days

DaysW
Width of the days

DaysH
Height of the days

DaysAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

DaysRasterizer
FONT = Use fonts to display the days
BITMAP = Use bitmap to display the days

DaysFont
The font to be used with the days. Check below for more info about the fonts.

DaysFontColor
Color of the font defined as BGR hex-value (e.g. DaysFontColor=44AAFF)

DaysBitmapName
Filename of the days bitmap. The bitmap must contain either numbers from 0 to 9 or from 0 to 31. All the numbers must be same size.

DaysNumOfComponents
Number of components in the bitmap. If the bitmap has numbers from 0 to 9, set this to 10. For numbers from 0 to 31 use value 32. Note that with 32 numbers the 0 is never used, so it may hold anything.

DaysSeparation
The horizontal separation of the numbers (i.e. how close/far the numbers are placed from each other). This is only applied with bitmaps when the number of components is 10. The value can be negative.

DaysIgnoreToday
0 = Draw a day for today 1 = Do not draw a day for today

DaysIgnoreEvent
0 = Draw a day for event days 1 = Do not draw a day for event days

DaysWeekendBitmapName
Same as DaysBitmapName but for the weekends.

DaysWeekendFontColor
Same as DaysFontColor but for the weekends.

DaysLayout
0 = 7 x 6 grid (i.e. the normal layout)
1 = Horizontal
2 = Vertical

TodayEnable
0 = Do not show today in calendar
1 = Show today in calendar

TodayAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

TodayRasterizer
FONT = Use fonts to display the today
BITMAP = Use bitmap to display the today

TodayFont
The font to be used with the today. Check below for more info about the fonts.

TodayFontColor
Color of the font defined as BGR hex-value (e.g. TodayFontColor=44AAFF)

TodayBitmapName
Filename of the today bitmap. The bitmap must contain either numbers from 0 to 9 or from 0 to 31. It can also contain just one image.

TodayNumOfComponents
Number of components in the bitmap. If the bitmap has numbers from 0 to 9, set this to 10. For numbers from 0 to 31 use value 32. If the bitmap contains only one image use value 1.

TodaySeparation
The horizontal separation of the numbers (i.e. how close/far the numbers are placed from each other). This is only applied with bitmaps when the number of components is 10. The value can be negative.

WeekdaysEnable
0 = Do not show weekdays in calendar
1 = Show weekdays in calendar

WeekdaysAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

WeekdaysRasterizer
FONT = Use fonts to display the weekdays
BITMAP = Use bitmap to display the weekdays

WeekdaysFont
The font to be used with the today. Check below for more info about the fonts.

WeekdaysFontColor
Color of the font defined as BGR hex-value (e.g. WeekdaysFontColor=44AAFF)

WeekdayNames
Weekday strings separated with '/'-char (E.g. WeekdayNames=Sun/Mon/Tue/Wed/Thu/Fri/Sat)

WeekdaysBitmapName
Filename of the weekdays bitmap. The bitmap must contain 7 items (one for each weekday).

MonthEnable
0 = Do not show month in calendar
1 = Show month in calendar

MonthX
X-position of the month

MonthY
Y-position of the month

MonthAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

MonthRasterizer
FONT = Use fonts to display the months
BITMAP = Use bitmap to display the months

MonthFont
The font to be used with the month. Check below for more info about the fonts.

MonthFontColor
Color of the font defined as BGR hex-value (e.g. WeekdaysFontColor=44AAFF)

MonthBitmapName
Filename of the months bitmap. The bitmap must contain 12 items (one for each month).

MonthNames
Names of the months separated with '/'-char (E.g MonthNames=January / February / March / April / May / June / July / August / September / October / November / December)

YearEnable
0 = Do not show year in calendar 1 = Show year in calendar

YearX
X-position of the year

YearY
Y-position of the year

YearAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

YearRasterizer
FONT = Use fonts to display the years
BITMAP = Use bitmap to display the years

YearFont
The font to be used with the year. Check below for more info about the fonts.

YearFontColor
Color of the font defined as BGR hex-value (e.g. WeekdaysFontColor=44AAFF)

YearBitmapName
Filename of the year bitmap. The bitmap must contain numbers from 0 to 9.

DaysSeparation
The horizontal separation of the numbers (i.e. how close/far the numbers are placed from each other). The value can be negative.

EventEnable
0 = Do not show events in calendar
1 = Show events in calendar

EventAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

EventRasterizer
FONT = Use fonts to display the events
BITMAP = Use bitmap to display the events

EventFont
The font to be used with the events. Check below for more info about the fonts.

EventFontColor
Color of the font defined as BGR hex-value (e.g. WeekdaysFontColor=44AAFF)

EventBitmapName
Filename of the events bitmap. The bitmap must contain either numbers from 0 to 9 or from 0 to 31. It can also contain just one image.

EventNumOfComponents
Number of components in the bitmap. If the bitmap has numbers from 0 to 9, set this to 10. For numbers from 0 to 31 use value 32. If the bitmap contains only one image use value 1.

EventSeparation
The horizontal separation of the numbers (i.e. how close/far the numbers are placed from each other). This is only applied with bitmaps when the number of components is 10. The value can be negative.

EventInCalendar
0 = Do not show event texts inside the calendar
1 = Show event texts inside the calendar

EventFont2
The font to be used with the events texts that are dran on the calendar. Check below for more info about the fonts.

EventFontColor2
Color of the font defined as BGR hex-value (e.g. WeekdaysFontColor=44AAFF)

EventIconEnable
If set to 0 the icons are not shown.

WeekNumbersEnable
0 = Do not show week numbers in calendar
1 = Show week numbers in calendar

WeekNumbersAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

WeekNumbersRasterizer
FONT = Use fonts to display the week numbers
BITMAP = Use bitmap to display the week numbers

WeekNumbersFont
The font to be used with the week numbers. Check below for more info about the fonts.

WeekNumbersFontColor
Color of the font defined as BGR hex-value (e.g. WeekdaysFontColor=44AAFF)

WeekNumbersBitmapName
Filename of the week numbers bitmap. The bitmap must contain either numbers from 0 to 9 or from 0 to 53. It can also contain just one image.

WeekNumbersNumOfComponents
Number of components in the bitmap. If the bitmap has numbers from 0 to 9, set this to 10. For numbers from 0 to 53 use value 54.

WeekNumbersSeparation
The horizontal separation of the numbers (i.e. how close/far the numbers are placed from each other). This is only applied with bitmaps when the number of components is 10. The value can be negative.

TodoW
The width of the todo window.

TodoFont
The font to be used with the todo items. Check below for more info about the fonts.

TodoFontColor
Color of the font defined as BGR hex-value (e.g. TodoFontColor=44AAFF)

TodoBitmapName
Name of the todo window's background image.

TodoBitmapMargins
Margins for the bitmap scaling. The margins are four comma separated values that define the non-scaled part of the images borders. e.g. TodoBitmapMargins=10,10,0,0 would leave 10 pixels from the left and top borders as is and scale the rest.

TodoTextMargins
Margins for the text. The margins are four comma separated values that define the borders for the text (i.e. text is not drawn on the border area).

TodoSeparation
The vertical separation of the todo items (i.e. how close/far the texts are placed from each other).

TodoItemBitmapName
Name of the image for the todo items.

TodoItemAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

TodoItemOffset
Offset to the todo item. This is two comma separated values (e.g. TodoItemOffset=10,-10)

MessageBoxBitmapName
Name of the messagebox background image.

MessageBoxFont
The font to be used with the messagebox texts. Check below for more info about the fonts.

MessageBoxFontColor
Color of the font defined as BGR hex-value (e.g. TodoFontColor=44AAFF)

MessageBoxBitmapMargins
Margins for the bitmap scaling. The margins are four comma separated values that define the non-scaled part of the images borders. e.g. MessageBoxBitmapMargins=10,10,0,0 would leave 10 pixels from the left and top borders as is and scale the rest.

MessageBoxTextMargins
Margins for the text. The margins are four comma separated values that define the borders for the text (i.e. text is not drawn on the border area).

MessageBoxTextMaxWidth
Maximum width in pixels that the message box can scale. The text is wrapped if longer than that.

MessageBoxSeparation
The horizontal separation of the event texts (i.e. how close/far the texts are placed from each other).

EventListW
The width of the event list window.

EventListFont
The font to be used with the event list items. Check below for more info about the fonts.

EventListFontColor
Color of the font defined as BGR hex-value (e.g. EventListFontColor=44AAFF)

EventListBitmapName
Name of the EventList window's background image.

EventListBitmapMargins
Margins for the bitmap scaling. The margins are four comma separated values that define the non-scaled part of the images borders. e.g. EventListBitmapMargins=10,10,0,0 would leave 10 pixels from the left and top borders as is and scale the rest.

EventListTextMargins
Margins for the text. The margins are four comma separated values that define the borders for the text (i.e. text is not drawn on the border area).

EventListSeparation
The vertical separation of the EventList items (i.e. how close/far the texts are placed from each other).

EventListHeaderItemBitmapName
Name of the image for the EventList items.

EventListHeaderItemAlign
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

EventListHeaderItemOffset
Offset to the EventList item. This is two comma separated values (e.g. EventListItemOffset=10,-10)

EventListHeaderFont
The font to be used with the event list headers. Check below for more info about the fonts.

EventListHeaderFontColor
Color of the font defined as BGR hex-value (e.g. EventListFontColor=44AAFF)

EventListHeaderSeparation
The vertical separation between the header and the items (i.e. how close/far the texts are placed from each other).

EventListHeaderFormat
The header format. Check here for the format codes. There are also a special code that can be used in the header: %D displays the number of days the events are from today.

EventListItemMargin
The horizontal margin for the event list items.

EventListItemIconEnable
If set to 1 the event icon is also shown in the event list.

EventListDaySeparation
Defines the space between the days in the event list.

Buttons

It's also possible to add buttons to the skins. This can be only done in the skin's ini-file as there is no GUI for the buttons. To add a button you need to create a new section called [ButtonN] where the N is a number (it can be any number as long as no other button is using it). The buttons can have these values:

Window
Defines the window where the button is placed. 0 = Calendar, 1 = Todo, 2 = MessageBox, 3 = EventList.

X
X-coordinate of the button. You can also give negative values in which case the button location is calculated from the right edge of the skin.

Y
Y-coordinate of the button.

BitmapName
The button image. The image must have 3 frames (normal, pushed and hover).

Command
The command that is executed when the button is pressed. It can be a normal application or a bang.

Enable
Set to 0, to disable the item.

Repeat
0=The item is drawn only once.
1=The item is draw on all calendars.
2=The item is drawn only on the current month.
3=The item is drawn only on the viewed month.

IncludeSize
If this is set to 1, the item is included in the calendar size calculation.

[Button1]
Window=0
X=5
Y=5
BitmapName=button-left.png
Command=!RainlendarShowPrev

Time items

Time items show the current date or time in the calendar. It's also possible to show the time in the tooltip. They can be used to e.g. show a clock or current day. Note that the window is updated only once per minute so you cannot use seconds in the clock (or you can but it's rather pointless). To add a time item you need to create a new section called [TimeN] where the N is a number (it can be any number as long as no other time item is using it). The time items can have these values:

Window
Defines the window where the button is placed. 0 = Calendar, 1 = Todo, 2 = MessageBox, 3 = EventList, 5 = Tooltip.

X
X-coordinate of the button. You can also give negative values in which case the button location is calculated from the right edge of the skin.

Y
Y-coordinate of the button.

Rasterizer
FONT = Use fonts to display the items
BITMAP = Use bitmap to display the items

BitmapName
The bitmap must have numbers from 0 to 9.

Align
0 = TopLeft
1 = TopRight
2 = TopCenter
16 = MiddleLeft
17 = MiddleRight
18 = Middle
32 = BottomLeft
33 = BottomRight
34 = BottomCenter

NumOfComponents
This defines how many components (or frames) the bitmap has. Separation
The horizontal separation of the numbers (i.e. how close/far the numbers are placed from each other). This is only applied with bitmaps when the number of components is 10. The value can be negative.

Digits
Number of digits used in the values. This applies only to bitmaps.

Font
The font to be used with the time items. Check below for more info about the fonts.

FontColor
Color of the font defined as BGR hex-value (e.g. FontColor=44AAFF)

Format
The time/date format. Check here for the format codes.

Enable
Set to 0, to disable the item.

Repeat
0=The item is drawn only once.
1=The item is draw on all calendars.
2=The item is drawn only on the current month.
3=The item is drawn only on the viewed month.

IncludeSize
If this is set to 1, the item is included in the calendar size calculation.

Location
This defines time zone. It must be defined exactly like the time zones are listed in the Windows Date and Time Properties. See below for example.

[Time1]
Window=0
X=-50
Y=10
Rasterizer=FONT
Font=-17/0/0/0/700/0/0/0/0/3/2/1/34/Arial
FontColor=FFFFFF
Format=%d
Location=(GMT-09:00) Alaska

Images

The images are similar as buttons and time items except that they do not do anything. An image is just drawn in the window. To add an image you need to create a new section called [ImageN] where the N is a number (it can be any number as long as no other image is using it). The imagess can have these values:

Window
Defines the window where the button is placed. 0 = Calendar, 1 = Todo, 2 = MessageBox, 3 = EventList.

X
X-coordinate of the image. You can also give negative values in which case the button location is calculated from the right edge of the skin.

Y
Y-coordinate of the image.

BitmapName
The name of the image.

Enable
Set to 0, to disable the item.

Repeat
0=The item is drawn only once.
1=The item is draw on all calendars.
2=The item is drawn only on the current month.
3=The item is drawn only on the viewed month.

IncludeSize
If this is set to 1, the item is included in the calendar size calculation.

[Image1]
Window=0
X=0
Y=0
BitmapName=shine.png

Fonts

The fonts are defined with 13 values and the name of the font all separated with '/'-char. The most important values are the first one which defines the height of the font and the last, which is the typeface name of the font. The height of the font is defined in logical size and not in the point size.

E.g. -17/0/0/0/700/0/0/0/0/3/2/1/34/Arial

The different values are in order:

  • height of font
  • average character width
  • angle of escapement
  • base-line orientation angle
  • font weight
  • italic attribute option
  • underline attribute option
  • strikeout attribute option
  • character set identifier (this is always DEFAULT_CHARSET unless UseSkinCharSet is set to 1)
  • output precision
  • clipping precision
  • output quality
  • pitch and family
  • typeface name
  • Check CreateFont() in Win32 API documentation for more info.

    Profiles

    With profiles you can customize individual events. When you create an event there is a combo box which can be used to select the profile for the event. The combo box lists the profiles that are defined in the current skin's ini-file, but you can also give a custom profile name. If a certain profile is not defined in a skin a default settings are used instead.

    The profiles are defined in the skin file by making a new section. The name of the section must start with the word "Profile" (without the quotes). After that you can put pretty much anything to make the section unique (i.e. there cannot be two sections that have same name (i.e. the string between []-chars, not the "Name=" string).

    The profile section must have a key called Name, which will give the identity to the profile. The name is the one that is displayed in the Edit Event dialog.

    Other keys that can be in the profile section are:

  • ToolTipFontColor
  • EventBitmapName
  • EventFontColor
  • EventFontColor2
  • EventIconName
  • EventIconAlign
  • EventDrawAlways
  • EventListFontColor
  • Priority
  • RecurringPostfixString
  • The values for the keys are exactly the same as defined above. The profile settings override the default skin settings, so for example if the default ToolTipFontColor value is black and you create a profile that defines it white, all events that use that profile will draw the tooltip texts white. Note that it is not necessary to give all the keys always; you can define just the ones that are necessary (default values are used for the missing keys).

    The EventIconName, EventIconAlign and EventDrawAlways can only be used with the profiles. The event icon is a small image that is displayed on top of the event with the given profile. The align uses the same alignment system as other aligns (check e.g. DaysAlign for the codes). If the EventDrawAlways is set to 1 it means that the event is drawn always on the calendar.

    The priority defines what is drawn on the calendar when there are several event on the same day. The repeating events also have predefined priorities so that less frequently happening events have higher priority. Like this:

    Daily Priority    = 10
    Weekly Priority   = 20
    Monthly Priority  = 30
    Yearly Priority   = 40
    Single Priority   = 50
    
    The profile's priority value is added to this to determine the actual priority for the event. If you don't want that the recurrence pattern affects the priorities of the events you can define them so that they are >50 apart from each other. E.g. 100, 200, 300, etc.

    The RecurringPostfixString will append the given text to the end of the events that use the profile. Note that the text will be added only to recurring events.

    Currently it is not possible to create/edit the profiles from the GUI. You need to create by hand with a text editor.

    E.g.

    [Profile 1]
    Name=Sunday
    ToolTipFontColor=00DDFF
    EventFontColor=DD8888
    
    [Profile 2]
    Name=Important
    ToolTipFontColor=FFFFFF
    EventFontColor=FFFFFF
    EventFontColor2=FFFFFF
    EventIconName=Icons/Lightning.png
    EventIconAlign=18